package com.jingdianjichi.wx.handler;

public enum WxMsgTypeEnum {
    SUBSCRIBE("event.subscribe", "用户关注事件"),
    TEXT_MSG("text", "用户消息事件");

    String msgType;

    String desc;

    WxMsgTypeEnum(String msgType, String desc) {
        this.msgType = msgType;
        this.desc = desc;
    }

    public static WxMsgTypeEnum getByMsgType(String msgType) {
        for (WxMsgTypeEnum wxMsgTypeEnum : WxMsgTypeEnum.values()) {
            if (wxMsgTypeEnum.msgType.equals(msgType)) return wxMsgTypeEnum;
        }
        return null;
    }
}
